package com.ra.component.mq;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

import com.espirit.eap.sa.LoginUser;

/**
 * 消息
 * @author colin
 * @date 2015年7月17日
 */
@Entity
public class MessageLoginUser implements Serializable{

	/**
	 * 序列号
	 */
	private static final long serialVersionUID = -6834714984819301122L;
	
	private Integer id;
	
	private MessageData messageData;
	
	private LoginUser receiver;
	
	private Integer status;
	
	private Date readTime;

	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	
	@ManyToOne(fetch=FetchType.LAZY)
	public MessageData getMessageData() {
		return messageData;
	}

	public void setMessageData(MessageData messageData) {
		this.messageData = messageData;
	}

	@ManyToOne(fetch=FetchType.LAZY)
	public LoginUser getReceiver() {
		return receiver;
	}

	public void setReceiver(LoginUser receiver) {
		this.receiver = receiver;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getReadTime() {
		return readTime;
	}

	public void setReadTime(Date readTime) {
		this.readTime = readTime;
	}
	
}
